I3DShShader Struct Reference
[Shell Interfaces]

Inheritance diagram for I3DShShader:

IMCUnknown List of all members.

Public Member Functions

virtual void MCCOMAPI Clone (I3DShShader **clone, ECloneMode mode) const =0
virtual boolean MCCOMAPI IsConstant ()=0
virtual boolean MCCOMAPI AssignsChannels ()=0
virtual void MCCOMAPI GetShadingFlags (ShadingFlags &theFlags)=0
virtual boolean MCCOMAPI HasExplicitLightingModel (const LightingContext &lightingContext)=0
virtual void MCCOMAPI ShadeAndLight (LightingDetail &result, const LightingContext &lightingContext)=0
virtual void MCCOMAPI DoShade (ShadingOut &result, ShadingIn &shadingIn)=0
virtual real MCCOMAPI GetValue (real &result, boolean &fullArea, ShadingIn &shadingIn)=0
virtual real MCCOMAPI GetColor (TMCColorRGBA &result, boolean &fullArea, ShadingIn &shadingIn)=0
virtual real MCCOMAPI GetVector (TVector3 &result, ShadingIn &shadingIn)=0
virtual void MCCOMAPI GetReflection (TReflectionParameters &reflectionParams, const ShadingIn &shadingIn)=0
virtual void MCCOMAPI GetTransparency (TTransparencyParameters &transparencyParams, const ShadingIn &shadingIn)=0
virtual void MCCOMAPI GetBump (TVector3 &result, ShadingIn &shadingIn)=0
virtual EShaderOutput MCCOMAPI GetImplementedOutput () const =0
virtual MCCOMErr MCCOMAPI GetOriginalParametricTextureMap (const uint32 &uvSpaceID, const uint32 &channelIndex, IShTextureMap **outMap)=0
virtual IShParameterComponent
*MCCOMAPI 
GetTransformComponent ()=0
virtual boolean MCCOMAPI GetSubShaderPreview (IShParameterComponent **shader, IShParameterComponent *subShader, FourCharT subShaderKeyword)=0
virtual void MCCOMAPI GetShaderPreview (IShParameterComponent **shader)=0
virtual EShaderFunctionType
MCCOMAPI 
GetSubShaderType (IDType keyword)=0

Detailed Description

I3DShShader is the shell interface of a shader function.

There are two interfaces to access a component: The shell interface (I3DShShader) and the external interface (I3DExShader) . You can get one from the other using QueryInterface.

Whenever it is possible you should use the Shell interface (I3DShShader) to access the component because the Shell will make sure that the parameter map of the external component is valid. This is especially important if the component is animated. For more information on components see the Overview of the SDK.

See also:
I3DExShader


Member Function Documentation

virtual boolean MCCOMAPI I3DShShader::AssignsChannels (   )  [pure virtual]
 

Should returns true if DoShade is implemented.

virtual void MCCOMAPI I3DShShader::Clone (  I3DShShader **  clone,
ECloneMode  mode
)  const [pure virtual]
 

Makes a copy of a shader and its sub shaders.

Parameters:
clone A pointer to the copy of the shader.
mode The clone Mode (see ECloneMode).

virtual void MCCOMAPI I3DShShader::DoShade (  ShadingOut &  result,
ShadingIn &  shadingIn
)  [pure virtual]
 

Returns the shading for a given point.

Parameters:
result The shading of the point.
shadingIn The information about the point to shade.

virtual void MCCOMAPI I3DShShader::GetBump (  TVector3 &  result,
ShadingIn &  shadingIn
)  [pure virtual]
 

Deprecated:
Do not implement at this point.
Parameters:
result 
shadingIn 

virtual real MCCOMAPI I3DShShader::GetColor (  TMCColorRGBA &  result,
boolean &  fullArea,
ShadingIn &  shadingIn
)  [pure virtual]
 

Returns the value of the shading function at a given point.

Parameters:
result The value of the shading function
fullArea True if the shading as been averaged for antiliasing.
shadingIn The info about the point to shade.

virtual EShaderOutput MCCOMAPI I3DShShader::GetImplementedOutput (   )  const [pure virtual]
 

Returns a bit field that determines which methods are implemented by this shading function.

virtual MCCOMErr MCCOMAPI I3DShShader::GetOriginalParametricTextureMap (  const uint32 &  uvSpaceID,
const uint32 &  channelIndex,
IShTextureMap **  outMap
)  [pure virtual]
 

Returns a texture map if there is one for a given channel (Color, Alpha, Transparency...)

Parameters:
uvSpaceID The UVSpaceID that is considered.
channelIndex The index of the channel
outMap The map the is output if there is one.

virtual void MCCOMAPI I3DShShader::GetReflection (  TReflectionParameters &  reflectionParams,
const ShadingIn &  shadingIn
)  [pure virtual]
 

Returns the parameters used to calculate the reflection. This function is only called if the shader is placed in the reflection channel of a multichannel.

Parameters:
reflectionParams The parameters used for reflections calculations
shadingIn The info about the point to shade

virtual void MCCOMAPI I3DShShader::GetShaderPreview (  IShParameterComponent **  shader  )  [pure virtual]
 

Creates a shader that can be used to preview this shader.

Parameters:
shader Shader created to be used for the preview (this shader must be a clone).

virtual void MCCOMAPI I3DShShader::GetShadingFlags (  ShadingFlags &  theFlags  )  [pure virtual]
 

Returns the ShadingFlags associated with this shader.

Parameters:
theFlags The ShadingFlags associated with this shader.

virtual boolean MCCOMAPI I3DShShader::GetSubShaderPreview (  IShParameterComponent **  shader,
IShParameterComponent *  subShader,
FourCharT  subShaderKeyword
)  [pure virtual]
 

Creates a shader that can be used to preview one of the subshader.

Parameters:
shader Shader created to be used for the preview.
subShader Shader to put in the sub shader with the keyword subShaderKeyword.
subShaderKeyword Keywork of the sub shader (in the PMap).
Returns:
true if the shader created have to be processed by the parent shader false if not.

virtual EShaderFunctionType MCCOMAPI I3DShShader::GetSubShaderType (  IDType  keyword  )  [pure virtual]
 

Get the type of a sub shader.

Parameters:
keyword Id of the sub shader.
Returns:
the type of the sub shader.

virtual IShParameterComponent* MCCOMAPI I3DShShader::GetTransformComponent (   )  [pure virtual]
 

Returns a pointer to the transform component that defines the 3D transform of the shader.

Returns:
A pointer to this shader's Transform component, or NULL if the shader does not have a Transform component.

virtual void MCCOMAPI I3DShShader::GetTransparency (  TTransparencyParameters &  transparencyParams,
const ShadingIn &  shadingIn
)  [pure virtual]
 

Returns the parameters used to calculate the transparency. This function is only called if the shader is placed in the transparency channel of a multichannel.

Parameters:
transparencyParams The parameters used for transparency calculations
shadingIn The info about the point to shade

virtual real MCCOMAPI I3DShShader::GetValue (  real &  result,
boolean &  fullArea,
ShadingIn &  shadingIn
)  [pure virtual]
 

Returns the value of the shading function at a given point.

Parameters:
result The value of the shading function
fullArea True if the shading as been averaged for antiliasing.
shadingIn The info about the point to shade.

virtual real MCCOMAPI I3DShShader::GetVector (  TVector3 &  result,
ShadingIn &  shadingIn
)  [pure virtual]
 

Returns a pertubation of the normal in local coordinates

Parameters:
result A vector in local coordinates.
shadingIn he info about the point to shade.

virtual boolean MCCOMAPI I3DShShader::HasExplicitLightingModel (  const LightingContext &  lightingContext  )  [pure virtual]
 

**************************************************************************** HasExplicitLightingModel

Returns true if there is an explicit lighting model in the subtree. This is mostly used for layer lists to determine if DoShade or ShadeAndLight should be called on the layer.

Parameters:
lightingContext The information about the point that should be lit.

virtual boolean MCCOMAPI I3DShShader::IsConstant (   )  [pure virtual]
 

Returns true if the shader has a constant result (to optimize things like Value and Color shaders).

virtual void MCCOMAPI I3DShShader::ShadeAndLight (  LightingDetail &  result,
const LightingContext &  lightingContext
)  [pure virtual]
 

Calculates the shading and lighting in one point

Parameters:
result The color seen by the observer
lightingContext info about the point being shaded and the lighting of the scene


The documentation for this struct was generated from the following file:
Generated on Wed Dec 7 14:27:35 2005 for Carrara SDK Doc by  doxygen 1.4.5